home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8554 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.1 KB  |  32 lines

  1. Newsgroups: boeing.comp.unix,comp.lang.c,comp.lang.c++,comp.sources.wanted
  2. Path: in2.uu.net!bcstec!waetzig
  3. From: waetzig@bcstec.ca.boeing.com (Todd Waetzig)
  4. Subject: regular expression matching source code
  5. Message-ID: <DMwHzn.LIF@bcstec.ca.boeing.com>
  6. Organization: The Boeing Company
  7. Distribution: na
  8. Date: Sat, 17 Feb 1996 03:35:46 GMT
  9.  
  10. I am looking for the 'C' or 'C++' source for a function to
  11. perform a match of a string. This function would
  12. use the syntax of regular expressions. This regular
  13. expression matching would be similar to that used by
  14. grep and sed.
  15.  
  16. Ideally it would look something like
  17.  
  18. if (match("^1([A-Z]*|[0-9]*)Z?",string_to_search) == 0)
  19.     printf("match found ");
  20.  
  21. this would match a string_to_search if it
  22.     began with a digit 1
  23.         followed by any number of occurences of uppercase letters
  24.     or by any number of occurrences of digits
  25.     followed by zero or one occurrence of the letter Z
  26.  
  27. Thanks,
  28.  
  29. -- 
  30. Todd Waetzig                Programmer/Analyst     Boeing Computer Services
  31.                                                    waetzig@bcstec.ca.boeing.com
  32.